package com.zero.lite.admin.web;

import com.zero.lite.dao.entity.Menu;
import com.zero.lite.dao.mapper.AdminMapper;
import com.zero.lite.dao.service.IAdminService;
import com.zero.lite.dao.utils.ResponseUtil;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/admin/index")
public class IndexController {
    private final Log logger = LogFactory.getLog(IndexController.class);
    @Autowired
    private IAdminService adminService;
    @Autowired
    private AdminMapper adminMapper;
    @RequestMapping("/index")
    public Object index(Integer adminId){
        List<Menu> menus=adminService.queryAllMenus(adminId);

        return ResponseUtil.ok(menus);
    }


}
